CXXFLAGS =	-O3 -g0 -Wall -fmessage-length=0 -I/usr/local/boost/include

OBJS =		Message.o Stream.o Logger.o NetworkLogger.o

LIBS =		-L/usr/local/boost/lib -Wl,-Bstatic -lboost_thread -lboost_system -lboost_date_time -lboost_serialization -Wl,-Bdynamic -lpthread

TARGET =	libnlog.so

$(TARGET):	$(OBJS)
	$(CXX) -shared -o $(TARGET) $(OBJS) $(LIBS)

all:	$(TARGET)

install:
	rm -vRf /usr/local/include/libnlog
	rm -vf /usr/local/lib/libnlog.so
	mkdir -p /usr/local/include/libnlog
	cp -vR *.hpp /usr/local/include/libnlog
	cp -vR $(TARGET) /usr/local/lib/

clean:
	rm -f $(OBJS) $(TARGET)
